﻿@model OASys.Web.Areas.ModuleSys.Models.ModelSysMenuManageIndex
@{
	Layout = null;
}
<div class="replace-container">
	 @* 表格数据显示*@
     
		<div class="common-table-container">
			<table class="common-table" id="common-table">
				<colgroup>
					<col width="20" />
					<col width="40" />
					<col width="40" />
					<col width="100" />
					<col width="100" />
					<col width="200" />
					<col width="100" />
					<col width="*" />
				</colgroup>
				<thead>
					<tr>
						<th>
							<input type="checkbox" class="common-table-checkbox-all" />
						</th>
						<th colspan="2">
							操作
						</th>
						@Html.HiddenFor(x => x.SearchEntity._OrderName, new { data_order_name = "" })
						@Html.HiddenFor(x => x.SearchEntity._OrderDirection, new { data_order_direction = "" })
						@(Html.ThOrderHelper<OASys.Entity.SysMenu>(x => x.Name, "菜单名称"))
						@(Html.ThOrderHelper<OASys.Entity.SysMenu>(x => x.ParentID, "父菜单名"))
						@(Html.ThOrderHelper<OASys.Entity.SysMenu>(x => x.Icon, "菜单图标"))
						@(Html.ThOrderHelper<OASys.Entity.SysMenu>(x => x.OrderIndex, "排序"))
						@(Html.ThOrderHelper<OASys.Entity.SysMenu>(x => x.TargetURL, "路由地址"))
					</tr>
				</thead>
				<tbody>
					@foreach (var item in Model.TreeDataSources)
	 {
						<tr ondblclick="javascript:show('@item.ID');">
							<td>
								@Html.CheckBox("checkboxItem", new { @class = "checkboxItem", value = item.ID })
							</td>
							<td>
								<a href="javascript:editSysMenu('@item.ID')" class="a-edit" title="修改">&nbsp</a>
							</td>
							<td>
								<a href="javascript:deleteSysMenu('@item.ID')" class="a-delete" title="删除">&nbsp</a>
							</td>
							<td>
								@item.Name
							</td>
							<td>
								@if (item.ParentID != null)
		{
									@(Model.treeDataSourcesAll.FirstOrDefault(x => x.ID == item.ParentID) == null ? "" : Model.treeDataSourcesAll.FirstOrDefault(x => x.ID == item.ParentID).Name)                               
		}
		else
		{
									@("无")
		}
							</td>
							<td>
								@item.Icon
							</td>
							<td>
								@item.OrderIndex
							</td>
							<td title="@item.TargetURL">
								@Project.Common.StringUtility.CutString(item.TargetURL, 40)
							</td>
						</tr>
	 }
				</tbody>
			</table>
		</div>
		<!--分页显示-->
		<div>
			@{
				Html.RenderPartial("/Views/Controls/PaginateAjax.cshtml", Model.PaginateHelperObject);
			}
		</div>
</div>